package com.six.vo;

import java.sql.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 过户单明细
 * 
 */
@Entity
@Table(name="WMS_T_TRANS_DETAILS")
public class TransferDetail {
	private int tdetailsID;// VARCHAR(16) 过户单明细编号
	private int tdetailsGoodsNum;// INTEGER 过户货物件数
	private Date tdetailsEditTime;// DATE 最后编辑时间
	private int tdetailsIsDel;// SMALLINT 是否已被删除
	private BillDetail billDetail;
	private Transfer transfer;
	
	
	public TransferDetail() {
		super();
	}
	public TransferDetail(int tdetailsID, int tdetailsGoodsNum,
			Date tdetailsEditTime, int tdetailsIsDel, BillDetail billDetail,
			Transfer transfer) {
		super();
		this.tdetailsID = tdetailsID;
		this.tdetailsGoodsNum = tdetailsGoodsNum;
		this.tdetailsEditTime = tdetailsEditTime;
		this.tdetailsIsDel = tdetailsIsDel;
		this.billDetail = billDetail;
		this.transfer = transfer;
	}
	@Id
	@GeneratedValue
	public int getTdetailsID() {
		return tdetailsID;
	}
	public void setTdetailsID(int tdetailsID) {
		this.tdetailsID = tdetailsID;
	}
	public int getTdetailsGoodsNum() {
		return tdetailsGoodsNum;
	}
	public void setTdetailsGoodsNum(int tdetailsGoodsNum) {
		this.tdetailsGoodsNum = tdetailsGoodsNum;
	}
	public Date getTdetailsEditTime() {
		return tdetailsEditTime;
	}
	public void setTdetailsEditTime(Date tdetailsEditTime) {
		this.tdetailsEditTime = tdetailsEditTime;
	}
	public int getTdetailsIsDel() {
		return tdetailsIsDel;
	}
	public void setTdetailsIsDel(int tdetailsIsDel) {
		this.tdetailsIsDel = tdetailsIsDel;
	}
	@OneToOne  
	@JoinColumn(name="detailsID") // VARCHAR(16) 业务单明细编号
	public BillDetail getBillDetail() {
		return billDetail;
	}
	public void setBillDetail(BillDetail billDetail) {
		this.billDetail = billDetail;
	}
	@ManyToOne(cascade={CascadeType.ALL})           
    @JoinColumn(name="transferID") 	 // VARCHAR(16) 过户单系统编号
	public Transfer getTransfer() {
		return transfer;
	}
	public void setTransfer(Transfer transfer) {
		this.transfer = transfer;
	}
	

}
